package org.dromara.wms.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.io.Serial;
import java.util.List;

@Data
@TableName("wms_bom_process")
public class WmsBomProcess {
  @Serial
  private static final long serialVersionUID = 1L;

  @TableId(value = "line_id", type = IdType.AUTO)
  @ExcelProperty(value = "主键")
  private Long lineId;

  @NotNull(message = "BOM主键不能为空", groups = {AddGroup.class, EditGroup.class})
  @ExcelProperty(value = "BOM主键")
  private Long id;

  /**
   * 工序id
   */
  @NotNull(message = "工序id不能为空", groups = {AddGroup.class, EditGroup.class})
  @ExcelProperty(value = "工序id")
  private Long processId;

  /**
   * 顺序
   */
  @NotNull(message = "顺序不能为空", groups = {AddGroup.class, EditGroup.class})
  @ExcelProperty(value = "顺序")
  private Long sort;

  /**
   * 绑定设备
   */
  @ExcelProperty(value = "绑定设备")
  private Long equipmentId;

  /**
   * 是否起
   */
  @ExcelProperty(value = "是否起")
  private String status;

  @JsonInclude(JsonInclude.Include.NON_EMPTY)
  @ExcelProperty(value = "删除物品工艺")
  @TableField(exist = false)
  private List<WmsBomProcess> deletes;
}
